/*package miniDVD;

import java.util.Scanner;

public class DVDMgr {
	Scanner input = new Scanner(System.in);
	DVD[] dvds = new DVD[6];
	
	// 初始化DVD
	public void init(){
		dvds[0] = new DVD("邓肯自传",0,0,12);
		dvds[1] = new DVD("三国演义",1,3,33);
		dvds[2] = new DVD("java",1,11,23);
	}
	
	// 新增DVD
	public void add(){
		System.out.println("---> 新增DVD\n");
		System.out.print("请输入DVD名称：");
		String nameInput = input.next();
		// 标识能否新增，false:不能新增,true:能新增
		boolean flag1 = false;
		for (int i = 0; i < dvds.length; i++){
			if (dvds[i].getName() == null){
				flag1 = true;
				nameInput = dvds[i].getName();
				break;
			}
		}
		if (flag1){
			System.out.println("新增DVD《"+nameInput+"》成功");
		}else{
			System.out.println("增加失败，货架已满");
		}
	}
	
	// 查看DVD
	public void find(){
		System.out.println("--->查看DVD");
		System.out.println("序号\t\t状态\t\t名称\t\t借出日期\t\t借出次数");
		for (int i = 0; i < dvds.length; i++){
			// 循环遍历数组，输出数组的非空元素信息
			if (dvds[i].getName()!=null){
				String state = (dvds[i].getState()==0)?"可借":"已借出";
				String date = (dvds[i].getState()==0)?"":dvds[i].getState()+"日";
				String count = dvds[i].getCount()+"次";
				System.out.println(i+1+"\t\t"+state+"\t\t《"+dvds[i].getName()+"》\t\t"+date+"\t\t"+count);
			}
		}
	}
	
	// 删除DVD
	public void delete(){
		System.out.println("--->删除DVD\n");
		System.out.print("请输入DVD名称：");
		String delete = input.next();
		// 标识能否找到要删除的DVD,true:能根据用户输入的DVD名称找到匹配的DVD，false:不能找到匹配的DVD，不能删除!
		boolean flag2 = false;
		int index = -1;
		for (int i = 0; i < dvds.length; i++) {
		//	if (delete.equals(dvds[i].getName())&&states[i]==1){
				//能找到，但是被借出去了
				flag2 = true;
				System.out.println("对不起要删除的DVD已被借出，不能删除");
				break;
		//	}else if(delete.equals(dvds[i].getName())&&states[i]==0){
				// 能找到，可以删除
				flag2 = true;
				index = i;
				System.out.println("删除DVD"+dvds[i].getName()+"成功!");
				break;
			}
		}
		//找到了DVD才删除
		if (index!=-1){
			// 根据上面找到的下标位置index，删除DVD
			for (int i = index; i < dvds.length;i++){
				//后面的值一次往前覆盖，最后一个值变为null
				if (i!=dvds.length-1){
					dvds[i].getName() = dvds[i+1].getName();
					states[i] = states[i+1];
					dates[i] = dates[i+1];
					counts[i] = counts[i+1];
				}
			}
			dvds[dvds.length-1] = null;
			states[dvds.length-1] = 0;
			dates[names.length-1] = 0;
			counts[names.length-1] = 0;
		}
		//if (!flag2){
			System.out.println("对不起，没有找到匹配的DVD信息，不能删除！");
		}
	}
}
*/